home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 237 / 237.d81 / free cell.dot (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2004-01-01  |  10.8 KB  |  465 lines

  1. 10 dv=peek(186):ifdv<8thendv=8
  2. 11 print"[144]":a=rnd(-ti)
  3. 12 uc=4613:hc=4675:hk=4739
  4. 13 dimx,y,cd(52),x1(15),y1(52),cr(8,52),cv(52),cc(52)
  5. 14 gosub5010
  6. 90 sys4608,224:.ed:.br,1:gosub500
  7. 91 .ol,243*256
  8. 99 gosub5030:.br,0:.mp,6,0
  9. 100 .do:.ee:.wb:.un e%:.tx,0
  10. 101 ife%<>-1then30000
  11. 102 .of:  poke53272,22: end
  12. 200 gosub300
  13. 202 e%=i%*2
  14. 299 .er:return
  15. 300 .bx,14,25,10,14,160,2:.tx,128+2
  16. 302 .pc,11,"quit game?"
  17. 304 .pc,13,"yes no"
  18. 306 .mz,2,17,19,21,22,13,13,2,128+0,"yn"
  19. 310 i%=sl%-2:return
  20. 500 dimsy(13),sx(7),sh(7):forx=2to7
  21. 501 poke53287+x,7:poke2040+x,137
  22. 502 px(x)=53248+x*2:py(x)=px(x)+1
  23. 503 next
  24. 504 sh(6)=4:sh(7)=4
  25. 506 fory=0to13:sy(y)=106+y*8:next
  26. 508 fory=0to7:sx(y)=(32+y*40)and255:next
  27. 510 poke53271,4:poke53277,4:poke53275,4
  28. 514 goto550
  29. 515 dn=0:iflx>7then541
  30. 516 poke53269,3:ly=cr(lx,0):lz=ly
  31. 517 ifly>14thenly=14
  32. 520 ifly<1thendn=1:return
  33. 526 pokepx(2),sx(lx):pokepy(2),sy(ly-1)
  34. 527 poke53264,(peek(53264)and3)orsh(lx)
  35. 532 poke53269,7
  36. 540 ly=lz:return
  37. 541 x=lx-7:ifcr(8,x)=0thendn=1:return
  38. 542 iflx>11thendn=1:return
  39. 543 pokepx(2),sx(lx-8)-8:pokepy(2),58
  40. 544 lx=lx-8:goto527
  41. 550 forx=1to13:cv(x)=x:cv(x+13)=x
  42. 552 cv(x+26)=x:cv(x+39)=x
  43. 554 cc(x)=0:cc(x+13)=1:cc(x+26)=1
  44. 556 next
  45. 600 pokemv+1,35
  46. 601 forx=0to7:.rd,x+1,x1(x),x1(x)+3,7,24:next
  47. 602 forx=xto11:x1(x)=x1(x-8)-1:x1(x+4)=x1(x-4)
  48. 603 .rd,x+1,x1(x),x1(x)+3,1,5
  49. 604 .rd,x+5,x1(x+4),x1(x+4)+3,1,5
  50. 605 next
  51. 607 .rd,17,0,6,0,0
  52. 609 .rd,18,7,15,0,0
  53. 610 .rd,19,37,39,0,0:return
  54. 699 rem"       getcard
  55. 700 [139]lx[177]7[167]720
  56. 701 ly[178]cr(lx,0):[139]ly[178]0[167][144]
  57. 702 cd[178]cr(lx,ly):x0[178]lx
  58. 704 cr(lx,0)[178]cr(lx,0)[171]1
  59. 706 ly[178]cr(lx,0):
  60. 707 [139]ly[178]0[167]:.bx,x1(lx),x1(lx)[170]3,6,11,128,11:[137]712
  61. 708 .op,cr(lx,ly),x1(lx),y1(ly)
  62. 710 .bx,x1(lx),x1(lx)[170]3,y1(ly)[170]5,y1(ly)[170]5,128,11
  63. 712 .ss,208:[142]
  64. 720 [139]lx[177]11[167]740
  65. 722 x[178]lx[171]7:cd[178]cr(8,x):cr(8,x)[178]0
  66. 724 .bx,x1(lx),x1(lx)[170]3,1,5,160,2
  67. 726 .ss,208:[142]
  68. 740 [144]
  69. 800 [139]lx[177]7[167]820
  70. 801 .tx,128:.p@,0,0,[196](cv(cd))[170][196](cc(cd))
  71. 802 [139]cr(lx,0)[178]0[167]808
  72. 803 [139]cv(cd)[179][177]cv(cr(lx,cr(lx,0))[171]1)[167]lx[178]x0:[137]808
  73. 804 [139]cc(cd)[178]cc(cr(lx,cr(lx,0)))[167]lx[178]x0
  74. 808 cr(lx,0)[178]cr(lx,0)[170]1
  75. 809 ly[178]cr(lx,0)
  76. 810 cr(lx,ly)[178]cd
  77. 812 .sr,208:.op,cd,x1(lx),y1(ly)
  78. 814 [142]
  79. 820 [139]lx[177]11[167]840
  80. 822 lx[178]lx[171]7:[139]cr(8,lx)[179][177]0[167]lx[178]x0:[137]808
  81. 824 cr(8,lx)[178]cd:cr(8,0)[178]cr(8,0)[170]1
  82. 826 .sr,208
  83. 828 .op,cd,x1(lx[170]7),1
  84. 830 [142]
  85. 840 [139]lx[177]15[167][144]
  86. 841 x[178]lx[171]7:
  87. 842 [139]cr(8,x)[178]0[175]cv(cd)[178]1[167]846
  88. 843 [139]cc(cr(8,x))[179][177]cc(cd)[167]lx[178]x0:[137]808
  89. 844 [139]cv(cr(8,x))[179][177]cv(cd[171]1)[167]lx[178]x0:[137]808
  90. 846 cr(8,x)[178]cd
  91. 848 .sr,208:.op,cd,x1(lx),1
  92. 849 [142]
  93. 900 [139]lx[177]7[167]:.of:[151]53272,22:[144]
  94. 1000 .bx,0,8,0,0,255,0
  95. 1001 .p@,8,0,"stopundo    ":.ss,232
  96. 1010 [141]2020
  97. 1060 pl[178]0:[139]dm[178]2[167]1065
  98. 1061 .bx,14,25,11,13,160,9
  99. 1062 .tx,9[170]128:.pc,12,"shuffling"
  100. 1065 [141]5020:[151]mv[170]1,35:[151]mv[170]2,19
  101. 1075 .do
  102. 1080 :.do
  103. 1081 ::.p1,2040,136:.p1,2041,136
  104. 1082 ::.p1,53287,7:.p1,mv[170]3,0
  105. 1100 ::.do:.ma:.kp,"sux"
  106. 1101 ::[139]r2%[167][141]6500
  107. 1102 ::.un cr% [176] i%:[139]i%[167]1150
  108. 1103 ::[139]cr%[177]15[167]i%[178]cr%[171]16:[137]1150
  109. 1104 ::lx[178]cr%[171]1:[141]515:gx[178]cr%[171]1
  110. 1105 ::[139]dn[178]1[167]1100
  111. 1106 ::.p1,2040,138:.p1,2041,138
  112. 1107 ::.p1,53287,8:.p1,mv[170]3,3
  113. 1108 ::tm[178]ti[170]30
  114. 1110 ::.do:.ma
  115. 1111 ::.un cr%:[139]tm[179]ti[176]cr%[171]1[179][177]gx[167]1119
  116. 1112 ::
  117. 1113 ::[139]cr(8,0)[178]4[167]1110
  118. 1114 ::[129]x[178]1[164]4:[139]cr(8,x)[178]0[167]y[178]x:x[178]4
  119. 1115 ::[130]:lx[178]y[170]7:[137]1120
  120. 1119 ::lx[178]cr%[171]1
  121. 1120 ::.ss,216:[141]3000:pl[178]dn
  122. 1121 ::[139]dn[178]0[167][141]3500:pl[178]dn
  123. 1122 ::[139]dn[178]0[167]1110
  124. 1123 ::[151]53269,3
  125. 1124 ::[129]x[178]5[164]8
  126. 1125 ::[139]cv(cr(8,x))[179][177]13[167]x[178]99
  127. 1126 ::[130]:[139]x[179][177]100[167]i%[178]4
  128. 1150 :.un i%:dn[178]0
  129. 1152 :[145]i%[141]1220,2100,1300,4000
  130. 1154 .un dn
  131. 1156 .er:[142]
  132. 1200 .ss,208
  133. 1201 .bx,12,26,10,14,160,6:.tx,6[170]128
  134. 1202 .pc,11,"restart game?"
  135. 1204 [141]304:.sr,208
  136. 1206 [139]i%[167]dm[178]2
  137. 1210 dn[178]i%:[142]
  138. 1220 .ss,208
  139. 1221 .bx,15,24,10,14,160,6:.tx,6[170]128
  140. 1222 .p@,16,11,"new gameletrestartletcancel"
  141. 1224 .mu,16,23,11,13,6,128,"nrc"
  142. 1225 .sr,208
  143. 1226 [139]sl%[178]3[167]dn[178]0:[142]
  144. 1228 [139]sl%[178]1[167]:.of:[138]
  145. 1229 [129]y[178]0[164]52:[129]x[178]0[164]8:cr(x,y)[178]0:[130]:[130]
  146. 1230 s$[178][196]([181]([187](1)[172]32000)[170]1)
  147. 1232 x[178][187]([171][197](s$))
  148. 1234 .bx,22,35,0,0,160,0
  149. 1235 .p@,22,0,"game: "[170]s$
  150. 1240 dm[178]sl%:dn[178]1:[142]
  151. 1256 [137]6000
  152. 1299 dm[178]sl%:dn[178]1:[142]
  153. 1300 .ss,208
  154. 1301 [141]300
  155. 1302 e%[178]i%[172]2:dn[178]i%
  156. 1303 .sr,208
  157. 1304 [142]
  158. 1400 [139]cr(8,0)[178]4[167]1110
  159. 1402 y[178]0:[129]x[178]1[164]4
  160. 1404 [139]cr(8,x)[178]0[167]y[178]x:x[178]4
  161. 1406 [130]:lx[178]y[170]7:[137]1120
  162. 1999 .er:[142]
  163. 2000 [142]
  164. 2001 x[178][181]([187](1)[172]3200)[170]1
  165. 2005 .bx,13,26,10,14,160,0:.tx,128
  166. 2010 .pc,11,"choose game:"
  167. 2011 s$[178][202]([196](x),2)
  168. 2012 .in,17[170]128,13[170]128,6,6,5,s$
  169. 2014 x[178][187]([171][197](w$)):.er:s$[178]w$
  170. 2015 .bx,22,35,0,0,160,0
  171. 2016 .p@,22,0,"game: "[170]w$:.ss,232
  172. 2019 dm[178]1:.er:[142]
  173. 2020 [139]dm[177]0[167][142]
  174. 2022 .ss,208: x[178][181]([187](1)[172]3200)[170]1
  175. 2025 .bx,13,26,10,16,160,0:.tx,128
  176. 2030 .pc,11,"this game:"
  177. 2031 s$[178][202]([196](x),2)
  178. 2032 .pc,13,s$:.pc,15,"play change"
  179. 2034 .mz,2,14,17,19,24,15,15,0,6[170]128,"pc"
  180. 2035 .sr,208
  181. 2036 [139]sl%[178]2[167]2005
  182. 2045 .bx,22,35,0,0,160,0
  183. 2046 .p@,22,0,"game: "[170]s$:.ss,232
  184. 2049 .er:[142]
  185. 2099 .er:[142]
  186. 2100 [143] undo
  187. 2102 [139]pl[178]0[167]dn[178]0:[142]
  188. 2103 [139]gu[177]0[167]2200
  189. 2106 [141]3400:dn[178]0:pl[178]0:[142]
  190. 2200 cr(lv,0)[178]lu:cr(gv,0)[178]gu
  191. 2202 gu[178]0:pl[178]0:.sr,216:dn[178]0:[142]
  192. 2999 .er:[142]
  193. 3000 [143] move stuff
  194. 3001 dn[178]0:gu[178]0:lu[178]0
  195. 3005 [139]gx[177]7[167]3100:cel 2 ..
  196. 3006 [139]lx[177]7[167]3200:col 2 cell
  197. 3007 [143]  col 2 col
  198. 3010 cf[178]cr(gx,cr(gx,0))
  199. 3012 ct[178]cr(lx,cr(lx,0))
  200. 3014 [139]cf[178]ct[167]dn[178]1:[142]
  201. 3015 [139]cr(lx,0)[178]0[167]3600:::3020
  202. 3016 [139]cv(cf)[179][177]cv(ct)[171]1[167][142]
  203. 3018 [139]cc(cf)[178]cc(ct)[167][142]
  204. 3020 [141]7000
  205. 3026 [141]7020
  206. 3030 dn[178]1:[142]
  207. 3100 [139]lx[177]7[167]3300:cel 2 cell
  208. 3101 [143] cel 2 col
  209. 3102 x[178]gx[171]7:cf[178]cr(8,x)
  210. 3104 [139]cf[178]0[167]dn[178]1:[142]
  211. 3106 ct[178]cr(lx,cr(lx,0)):[139]cr(lx,0)[178]0[167]3112
  212. 3108 [139]cv(ct)[179][177]cv(cf)[170]1[167][142]
  213. 3110 [139]cc(ct)[178]cc(cf)[167][142]
  214. 3112 cr(8,x)[178]0:cr(8,0)[178]cr(8,0)[171]1
  215. 3114 [141]7020
  216. 3116 .bx,x1(gx),x1(gx)[170]3,1,5,160,2
  217. 3119 ch[178]cf
  218. 3120 dn[178]1:[142]
  219. 3200 [143] col 2 cell
  220. 3202 x[178]lx[171]7:ct[178]cr(8,x)
  221. 3204 gy[178]cr(gx,0):[139]gy[178]0[167][142]
  222. 3206 cf[178]cr(gx,gy)
  223. 3208 [139]lx[177]11[167]3230
  224. 3210 [139]ct[179][177]0[167][142]
  225. 3212 cr(8,x)[178]cf:cr(8,0)[178]cr(8,0)[170]1
  226. 3214 [141]7000
  227. 3216 .op,cf,x1(lx),1
  228. 3222 dn[178]1:[142]
  229. 3229 [143] aces
  230. 3230 [139]ct[178]0[167]3236
  231. 3234 [139]cc(ct)[179][177]cc(cf)[167][142]
  232. 3235 [139][181]((ct[171]1)[173]13)[179][177][181]((cf[171]1)[173]13)[167][142]
  233. 3236 [139]cv(ct)[179][177]cv(cf)[171]1[167][142]
  234. 3238 cr(8,x)[178]cf:ch[178]cf:[137]3214
  235. 3300 [143] cel 2 cell
  236. 3302 g[178]gx[171]7:cf[178]cr(8,g)
  237. 3304 x[178]lx[171]7:ct[178]cr(8,x):[139]ct[178]cf[167]dn[178]1:[142]
  238. 3306 [139]lx[177]11[167]3320:aceii
  239. 3308 [139]ct[179][177]0[167][142]
  240. 3310 cr(8,x)[178]cf:cr(8,g)[178]0
  241. 3312 .bx,x1(gx),x1(gx)[170]3,1,5,160,2
  242. 3314 .op,cf,x1(lx),1:ch[178]cf
  243. 3316 dn[178]1:[142]
  244. 3319 [143] aceii
  245. 3320 [139]ct[178]0[167]3324
  246. 3322 [139]cc(ct)[179][177]cc(cf)[167][142]
  247. 3323 [139][181]((cf[171]1)[173]13)[179][177][181]((ct[171]1)[173]13)[167][142]
  248. 3324 [139]cv(ct)[179][177]cv(cf)[171]1[167][142]
  249. 3326 cr(8,0)[178]cr(8,0)[171]1:[137]3310
  250. 3400 [143] undo
  251. 3401 gu[178]0
  252. 3402 [139]lx[177]7[167]3420
  253. 3404 cr(lx,0)[178]cr(lx,0)[171]1
  254. 3406 [139]gx[177]7[167]3430
  255. 3408 cr(gx,0)[178]cr(gx,0)[170]1
  256. 3410 .sr,216
  257. 3412 [142]
  258. 3420 [139]lx[177]11[167]3440
  259. 3422 x[178]lx[171]7:cr(8,x)[178]0:cr(8,0)[178]cr(8,0)[171]1
  260. 3424 [137]3406
  261. 3430 x[178]gx[171]7:cr(8,x)[178]ch
  262. 3434 cr(8,0)[178]cr(8,0)[170]1
  263. 3436 [137]3410
  264. 3440 x[178]lx[171]7:ca[178]cr(8,x):ci[178]ca[171]1
  265. 3442 [139]cv(ca)[178]1[167]ci[178]0
  266. 3444 cr(8,x)[178]ci:[137]3406
  267. 3500 dn[178]0:[139]gx[177]7[176]lx[177]7[167][142]
  268. 3501 gy[178]cr(gx,0):gu[178]0:lu[178]0:[151]53289,3:[139]gy[178]0[167][151]53289,7:[137]3590
  269. 3502 y[178]0:[129]x[178]0[164]7:[139]cr(x,0)[178]0[167]y[178]y[170]1
  270. 3504 [130]:dp[178](5[171]cr(8,0))[172]cz(y)
  271. 3506 by[178]cr(gx,0)[171]dp[170]1:[139]by[179]1[167]by[178]1
  272. 3508 ct[178]cr(lx,cr(lx,0)):[139]ct[178]0[167]3550
  273. 3509 tv[178]cv(ct)[171]1:tc[178]cc(ct)
  274. 3510 [129]x[178]gy[164]by[169][171]1
  275. 3512 [139]cv(cr(gx,x))[178]tv[175]cc(cr(gx,x))[179][177]tc[167]3520
  276. 3514 [139]cv(cr(gx,x[171]1))[179][177]cv(cr(gx,x))[170]1[176]cc(cr(gx,x[171]1))[178]cc(cr(gx,x))[167]3518
  277. 3516 [137]3522
  278. 3518 x[178][171]10:by[178]0:[137]3522
  279. 3520 by[178]x:x[178][171]10
  280. 3522 [130]:[139]x[178]by[171]1[167]dn[178]0:by[178]0
  281. 3524 [139]by[178]0[167][151]53289,7:[142]
  282. 3525 gu[178]gy:lu[178]cr(lx,0):.ss,216:gv[178]gx:lv[178]lx
  283. 3526 [129]x[178]by[164]gy
  284. 3528 cr(lx,0)[178]cr(lx,0)[170]1:ly[178]cr(lx,0)
  285. 3530 cr(lx,ly)[178]cr(gx,x)
  286. 3532 .op,cr(lx,ly),x1(lx),y1(ly)
  287. 3534 [130]
  288. 3536 [139]by[178]1[167]:.bx,x1(gx),x1(gx)[170]3,6,24,128,11:[137]3542
  289. 3538 .op,cr(gx,by[171]1),x1(gx),y1(by[171]1)
  290. 3540 [139]by[179]15[167]:.bx,x1(gx),x1(gx)[170]3,10[170]by,24,128,11
  291. 3542 cr(gx,0)[178]by[171]1
  292. 3544 dn[178]1:[151]53289,7:[142]
  293. 3550 dp[178](5[171]cr(8,0))[172]cz(y[171]1)
  294. 3552 by[178]cr(gx,0)[171]dp[170]1:[139]by[179]1[167]by[178]1
  295. 3554 [129]x[178]gy[164]by[169][171]1
  296. 3556 [139]cv(cr(gx,x[171]1))[178]cv(cr(gx,x))[170]1[175]cc(cr(gx,x[171]1))[179][177]cc(cr(gx,x))[167]3560
  297. 3558 by[178]x:x[178][171]10
  298. 3560 [130]
  299. 3562 [137]3525
  300. 3590 [151]2040,136:[151]2041,136:[142]
  301. 3599 [153]"load"by:[151]53272,22:.of:[144]
  302. 3600 .ss,216
  303. 3601 .bx,27,39,0,4,160,2:.tx,2[170]128
  304. 3602 .p@,28,1,"move...letsingle cardletcolumn"
  305. 3608 .mu,28,38,2,3,2,8[170]128,"sc"
  306. 3610 .sr,216
  307. 3612 [139]sl%[178]1[167]3020
  308. 3614 dn[178]0:[142]
  309. 4000 dn[178]1:.ss,208:[139]p9$[179][177]""[167]p9$[178]" "[170]p9$
  310. 4001 [151]2040,136:[151]2041,136:[151]53287,7
  311. 4002 .bx,6,34,10,17,160,8
  312. 4004 .tx,8[170]128
  313. 4006 .pc,11,"congratulations"[170]p9$[170]"!"
  314. 4008 .pc,13,"you just won game "[170]s$
  315. 4010 .pc,14,"dave moorman's free cell"
  316. 4012 .pc,16,"play again  exit free cell"
  317. 4014 .mz,2,7,16,19,32,16,16,8,6[170]128,"pe"
  318. 4015 [139]p9$[179][177]""[167]p9$[178]"fc."[170][202](p9$,2):[141]4100
  319. 4016 [139]sl%[178]1[167]:.of:[138]
  320. 4018 [137]30000
  321. 4100 .qs
  322. 4101 [159]4,dv,4,p9$:[132]4,s$
  323. 4102 [160]4:s$[178][202]([196]([197](s$)[170]1),2)
  324. 4104 [159]1,dv,15,"s0:"[170]p9$:[160]1
  325. 4106 [159]4,dv,4,p9$[170]",s,w"
  326. 4108 [152]4,s$:[160]4:.qr:[142]
  327. 5000 [143]"   shuffle cards
  328. 5001 forx=1to52:cd(x)=x:y1(x)=20:next
  329. 5002 rem ifdm=2then5007
  330. 5003 forx=1to52:r=int(rnd(1)*52)+1
  331. 5004 y=cd(r):cd(r)=cd(x):cd(x)=y
  332. 5006 next
  333. 5007 dm=0:forx=0to14:y1(x)=x+6:next
  334. 5008 return
  335. 5010 rem"   set positions
  336. 5012 [129]x[178]0[164]7:x1(x)[178]1[170]x[172]5:[130]
  337. 5014 [134]cz(6):[129]x[178]0[164]6:[135]cz(x):[130]
  338. 5016 [131]1,2,4,7,11,16,22
  339. 5019 [142]
  340. 5020 [129]x[178]0[164]8:cr(x,0)[178]0:cr(8,x)[178]0:[130]:[139]dm[178]2[167]5022
  341. 5021 [141]5000:.sr,232
  342. 5022 dm[178]0:x1[178]0:y1[178]7:[129]x[178]1[164]52
  343. 5024 .op,cd(x),x1(x1),y1
  344. 5025 cr(x1,y1[171]6)[178]cd(x):cr(x1,0)[178]cr(x1,0)[170]1
  345. 5026 x1[178]x1[170]1:[139]x1[178]8[167]y1[178]y1[170]1:x1[178]0
  346. 5028 [130]:[142]
  347. 5030 [143]"  clear board
  348. 5032 forx=0to7
  349. 5034 .bx,x1(x),x1(x)+3,6,24,128,11
  350. 5036 next:.ss,232:return
  351. 5040 y1=y:ify1>13theny1=13
  352. 5042 .op,cr(x,y),x1(x),y1+6
  353. 5044 return
  354. 5050 forx=0to7:fory=1tocr(x,0)
  355. 5051 gosub5040:next:next:return
  356. 5060 .bx,x1(x),x1(x)+3,6,24,128,11
  357. 5062 fory=1tocr(x,0):gosub5040
  358. 5064 next:return
  359. 6000 open15,dv,15,"r0:player=player"
  360. 6002 input#15,en:close15:.qr
  361. 6003 ifen=63then6100
  362. 6009 .bx,14,26,10,15,160,6:.tx,6+128
  363. 6010 .p@,15,11,"series play[136][136]new player[136]cancel"
  364. 6012 .mu,15,24,13,14,6,128,"nc"
  365. 6013 ifsl%=2then:.of:run
  366. 6014 .er
  367. 6016 .bx,14,28,10,14,160,6:.tx,6+128
  368. 6018 .p@,15,11,"input name:"
  369. 6020 .in,15+128,13,6,0,6,"":.er:ifw$=""then6009
  370. 6021 .qs
  371. 6022 open1,dv,15,"s0:player":close1
  372. 6024 open4,dv,4,"player,s,w"
  373. 6026 print#4,w$:close4:.qr
  374. 6027 open1,dv,15,"r0:fc."+w$+"=fc."+w$:input#1,en:close1:ifen=63then6000
  375. 6028 open4,dv,4,"fc."+w$+",s,w"
  376. 6030 print#4,"1":close4:.qr
  377. 6100 .qs:open4,dv,4,"player":input#4,w$
  378. 6102 close4:open4,dv,4,"fc."+w$
  379. 6104 input#4,s$:close4:.qr
  380. 6110 .bx,14,30,8,15,160,6:.tx,6+128
  381. 6112 .p@,15,9,"welcome, "+w$
  382. 6114 .p@,15,11,"play game "+s$
  383. 6116 .p@,15,12,"change player"
  384. 6118 .p@,15,13,"new player"
  385. 6120 .p@,15,14,"cancel"
  386. 6122 .mu,15,29,11,14,6,128,""
  387. 6124 ifsl%=1then6200
  388. 6126 ifsl%=0orsl%=4then:.of:run
  389. 6128 ifsl%=2then6210
  390. 6130 ifsl%=3then6014
  391. 6200 .er:.bx,22,36,0,0,160,0:.tx,128
  392. 6202 .p@,22,0,"game: "+s$:.ss,232
  393. 6203 x=rnd(-val(s$)):p9$=w$
  394. 6204 dm=0:goto1060
  395. 6210 .b$,"$:fc.*",dv,49152,127
  396. 6212 .rk,49152:.$l,49152
  397. 6214 forx=1ton%:.ri,x
  398. 6216 .$p,mid$(f$,4):next
  399. 6218 .rk,49152:print"[147]":poke53272,20:.bg,0:.br,0
  400. 6220 .ml,10,26,0,16,6,2,6,6,0,"",""
  401. 6222 ifw$=""then:.of:run
  402. 6224 open4,dv,4,"fc."+w$:input#4,s$
  403. 6225 close4
  404. 6226 open1,dv,15,"s0:player":close1
  405. 6228 open4,dv,4,"player,s,w"
  406. 6230 print#4,w$:close4
  407. 6250 print"[147]":poke53272,18:.er:goto6110
  408. 6500 gy=0:forlx=0to7
  409. 6502 ly=cr(lx,0):ifly=0then6514
  410. 6504 jg=1:gosub515:jg=0
  411. 6506 fory=5to8
  412. 6508 ifcr(8,y)=0then6520
  413. 6510 ifcv(cr(8,y))+1=cv(cr(lx,ly))then6530
  414. 6512 next
  415. 6514 next:poke53269,3
  416. 6516 ifgy=1then6500
  417. 6517 forx=5to8:ifcv(cr(8,x))<>13thenx=99
  418. 6518 next:ifx=9theni%=4
  419. 6519 return
  420. 6520 ifcv(cr(lx,ly))<>1then6512
  421. 6522 cr(8,y)=cr(lx,ly)
  422. 6523 gy=1:pl=0:poke53269,3
  423. 6524 cr(lx,0)=cr(lx,0)-1:ly=cr(lx,0)
  424. 6525 .op,cr(8,y),x1(y-1),1
  425. 6526 ifly=0then:.bx,x1(lx),x1(lx)+3,6,24,128,11:goto6529
  426. 6527 .op,cr(lx,ly),x1(lx),y1(ly)
  427. 6528 ifly<14then:.bx,x1(lx),x1(lx)+3,ly+11,ly+11,128,11
  428. 6529 goto6512
  429. 6530 rem poke53280,peek(53280)+1and15
  430. 6531 ifint((cr(8,y)-1)/13)<>int((cr(lx,ly)-1)/13)then6512
  431. 6532 goto6522
  432. 7000 cr(gx,0)=cr(gx,0)-1:gy=cr(gx,0)
  433. 7002 ifgy=0then:.bx,x1(gx),x1(gx)+3,6,11,128,11:return
  434. 7004 .op,cr(gx,gy),x1(gx),y1(gy)
  435. 7006 :
  436. 7008 ifgy<14then:.bx,x1(gx),x1(gx)+3,gy+11,gy+11,128,11
  437. 7010 return
  438. 7020 cr(lx,0)=cr(lx,0)+1:ly=cr(lx,0)
  439. 7022 cr(lx,ly)=cf
  440. 7024 .op,cf,x1(lx),y1(ly):return
  441. 8008 .of:poke53272,22:stop
  442. 30000 print"[147]":.bg,1:.br,1:.tx,01:poke53272,22
  443. 30005 .pc,11,"[199]ood [194]ye from
  444. 30006 .pc,13,"(NULL) (NULL)closeatn str$ (NULL) (NULL) atn (NULL)"
  445. 30007 .tx,0:[137]30040
  446. 30010 .pc,11,"(NULL)ress <atnlt-(NULL)> to
  447. 30020 .pc,12,"[210]eturn to [215]indows."
  448. 30030 .tx,0
  449. 30040 .of
  450. 40000 fori=0to21:poke828+i,8+i:next
  451. 40010 ifdv<8ordv>29ordv=8then40030
  452. 40020 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  453. 40030 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
  454. 40040 close2:open2,i,2:close2:ifstthen40060
  455. 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
  456. 40060 next:poke53272,23:poke186,8:poke53280,0:poke53281,0:end
  457. 40070 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  458. 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  459. 40090 print"run:":poke631,13:poke632,13:poke198,2:end
  460. 60000 d=peek(186):gosub60008:n$=n$+".dot"
  461. 60001 open1,d,15,"i0":print#1,"s0:"+n$:close1:saven$,d
  462. 60002 verifyn$,d:end
  463. 60008 n$="free cell"
  464. 60009 return
  465.